package com.situ.springboot.mapper;

import com.situ.springboot.pojo.vo.CountCustomidVo;
import com.situ.springboot.pojo.vo.CountServiceidVo;
import com.situ.springboot.pojo.vo.RecordVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RecordMapper {
    List<RecordVO> selectByPage(int offset, Integer pageSize);

    int selectTotalCount();

    void update(RecordVO recordVO);

    @Select("select * from record where id=#{id}")
    RecordVO selectById(Integer id);

    List<RecordVO> selectByCustomId(Integer id);

    void add(RecordVO recordvo);

    @Select("select * from record where custom_id=#{customId} and service_id=#{serviceId}")
    List<RecordVO> selectByCustomIdAndServiceId(Integer customId, Integer serviceId);

    //RecocrrdMapper.java

    List<CountCustomidVo> selectByCustomIdCount();

    List<CountServiceidVo> selectByServiceIdCount();

}
